import { PortalBaseSchema, PortalBaseSchemaRenderType, PortalBaseSchemaType, PortalProperty, PortalPropertyType } from "../../interface/template/declare";
import { BasePortalDefination } from "./BasePortalDefination";

export class LabelPortalSchema implements PortalBaseSchema {
  type: PortalBaseSchemaType;
  name: string;
  properties: PortalProperty[];
  render: PortalBaseSchemaRenderType

  constructor() {
    this.type = 'mutial'
    this.name = 'label'
    this.render = 'icon'

    this.properties = [
      {
        type: PortalPropertyType.Text,
        title: '名称',
        name: 'name'
      },
      {
        type: PortalPropertyType.File,
        title: '请上传图标',
        name: 'thumbnail'
      }
    ]
  }
}

export class LabelPortalDefination extends BasePortalDefination {
  schema: LabelPortalSchema;
  name: string;

  constructor(){
    super()
    this.title = '宣传标签'
    this.schema = new LabelPortalSchema()
  }
}